package UI;

import javax.swing.*;
import javax.swing.border.LineBorder;
import java.awt.*;

public class Welcome extends JFrame {
    private static final long serialVersionUID = -2970626103134592561L;

    //无参构造方法
    public Welcome() {
        init();//调用时进行初始化界面操作
    }

    /*1.初始化界面*/
    private void init() {
        setSize(430, 300);
        JPanel pane = new JPanel(new BorderLayout());
        ImageIcon ico = new ImageIcon(getClass().getClassLoader().getResource("GUI/welcome.png"));
        JLabel l = new JLabel(ico);
        pane.add(BorderLayout.CENTER, l);
        //添加有线边框,颜色设置成灰色
        pane.setBorder(new LineBorder(Color.GRAY));
        setContentPane(pane);
        setUndecorated(true);
        setLocationRelativeTo(null);
    }
}
